import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';

@Entity()
export class Friend {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'varchar', length: 32, comment: '网站名称' })
  name: string;

  @Column({ type: 'varchar', length: 255, comment: '网站链接' })
  url: string;

  @Column({ type: 'varchar', length: 255, comment: '网站icon链接' })
  iconUrl: string;

  @Column({ type: 'varchar', length: 255, comment: '网站描述' })
  description: string;

  // 隐藏0 显示1
  @Column({ type: 'tinyint', comment: '隐藏0 显示1' })
  status: number;

  // 友链1 网站2
  @Column({ type: 'tinyint', comment: '友链1 网站2' })
  type: number;

  // 排序优先级 越小越前
  @Column({ type: 'int', default: 0, comment: '排序优先级 越小越前' })
  sort: number;

  @CreateDateColumn()
  createTime: Date;

  @UpdateDateColumn()
  updateTime: Date;
}
